Skip to content

nirajan550123/ercot-queue-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waiting for the Grid: ERCOT's 434 GW Interconnection Queue in Spatial SQL

433.8 GW of proposed generation is waiting in ERCOT's interconnection queue (June 2026), 2.4 times everything currently operating in Texas, and if history holds, less than a third of it will ever be built. This project measures that queue with PostgreSQL/PostGIS: where projects want to connect, which counties are under the most queue pressure, what fraction of historical entrants survived, and what role interconnection cost plays in the pattern. SQL is the star; Python appears only as a loader and a plotter.

This is the sequel to solar-siting-tx, which found that grid access, not sunshine, decides where Texas solar gets built. This project measures the fight for that grid access as it happens.

All headline numbers below come from queries in sql/, runnable top to bottom, with outputs preserved in outputs/.

Headline findings

The queue is 1,714 large-generation projects totaling 433.8 GW (ERCOT GIS Report, June 2026, after cleaning: capacity > 0, latest amendment per INR). Batteries are the largest share at 162.4 GW (37.4%), then solar 151.7 GW (35.0%), gas 69.7 GW (16.1%), wind 47.1 GW (10.9%). Solar and batteries together are 1,439 projects and 314.0 GW, and solar + battery + wind make up 83.3% of queued capacity. For scale, all operating generators in Texas in EIA-860 (2024) total 179.6 GW.

Queue pressure is concentrated and often lands where almost nothing operates today. Pecos County leads in absolute terms with 20.4 GW queued against 3.1 GW existing. The extreme ratios are in counties with tiny existing fleets: Wilson County has 3.5 GW queued against 7 MW operating (a 500x ratio). Ten "new frontier" counties, led by Anderson (4.8 GW) and Caldwell (4.7 GW), have queued gigawatts and zero operating utility-scale capacity.

County choropleth of queue pressure: queued MW as a multiple of operating capacity, by Texas county

Historically, only 28.8% of ERCOT queue entrants got built. Across the 2010-2020 entry cohorts in LBNL's Queued Up data (1,199 ERCOT projects), 345 (28.8%) reached commercial operation, 557 (46.5%) formally withdrew, and 297 (24.8%) are still pending or suspended, concentrated in the 2019-2020 cohorts (46% of the 2020 cohort is unresolved). Because pending projects can still build, recent-cohort completion rates are floors, not final values, and the figure plots the pending share so that censoring is visible. Completion varies sharply by fuel: gas 37.5%, wind 35.3%, solar 21.9%, standalone battery 14.9%. Post-2020 cohorts are excluded entirely: 63-93% of their outcomes are still pending (right-censoring), so their completion rates are not yet meaningful.

Cohort attrition: share of ERCOT queue entrants built, withdrawn, and still pending by entry year, and completion rate by fuel

A null finding, published on purpose: newer solar is NOT sited farther from the grid. Operating solar that came online 2021-2024 sits a median 778 m from a transmission line versus 952 m for 2016-2020 vintage, and the 90th percentile fell from 8,024 m to 3,730 m. The "latecomers get pushed away from the wires" story is not in this data. Wind shows the opposite drift (1,867 m for pre-2016 plants to 3,841 m for 2021-2024).

Distance to nearest transmission line: operating fleet by fuel, and operating solar by vintage

The geolocation problem (the flagship SQL)

The ERCOT report gives each project a county and a named point of interconnection ("59903 Bearkat 345kV", "Tap 345kV 76003 Big Hill - 60708 Orsted"), not coordinates. Geolocating projects is itself the analysis:

  1. poi_norm() strips bus numbers, voltage tokens, and generic words (tap, substation, switch...) from both sides.
  2. pg_trgm similarity() matches each POI to substations within the project's county plus a 15 km buffer, threshold 0.45, best match per project via ROW_NUMBER().
  3. No match falls back to the county's interior point, and a loc_method flag rides along every downstream query.

Match rate: 47.6% (816 of 1,714 projects matched a named substation; 316 were exact name matches after normalization; average similarity 0.743). The other 52.4% carry loc_method = 'county_centroid' and are excluded from any distance-based statement. A 30-project random sample of matches was reviewed by hand (outputs/poi_validation_sample.csv): all 30 resolved to a plausible substation; 13 were exact name matches; 13 were line-tap POIs matched to one named endpoint of the tapped line, which carries a location error up to that line segment's length. That error mode is why no sub-kilometre claims are made for matched queue projects.

A methodological trap, documented instead of hidden: matched projects sit a median of 6-8 m from a transmission line by construction, because their assigned point is the POI substation and substations sit on lines. The POI is the interconnection point, not the plant site. So "distance to grid" is meaningful for the operating fleet (real EIA-860 plant coordinates) but circular for queued projects, and this project never uses it for them (sql/05_grid_distance.sql keeps the diagnostic).

The cost factor (answering the strongest critique)

Readers of the solar-siting project argued that its grid-hugging result is really a cost result. They are right about the mechanism, and in ERCOT the two explanations are one: ERCOT runs a "connect and manage" interconnection regime in which the developer pays for its gen-tie to the point of interconnection while deeper network upgrades are largely socialized and congestion is managed in the market (Howland, 2023; Driscoll, 2026). Distance to the existing grid therefore approximates the developer's dominant location-dependent interconnection cost. Public project-level interconnection cost data does not exist for ERCOT: Berkeley Lab's interconnection cost studies cover MISO, PJM, SPP, ISO-NE, NYISO, and several non-ISO utilities, but not ERCOT (Lawrence Berkeley National Laboratory, n.d.), so distance is also the only honest public proxy.

Two results here speak to it:

  1. Cost shapes siting before queue entry. 47.6% of queued projects name an existing substation as their POI, and the POI-distance diagnostic (6-8 m) shows interconnection requests are, almost by definition, placed on the existing network. The corridor-hugging pattern in the siting project is the visible footprint of developers minimizing gen-tie cost at site-selection time.
  2. But grid sparsity does not predict who survives the queue. If long gen-ties killed projects after entry, withdrawal rates should fall as county transmission density rises. They don't: across settled 2010-2020 LBNL cohorts joined to county grid density (metres of HIFLD transmission line per km²), withdrawal by density quartile runs 47.8%, 63.0%, 52.9%, 49.3% from sparsest to densest, no monotonic gradient, and the same holds for solar+wind only (outputs/distance_attrition.csv). A consistent reading of both results: developers internalize gen-tie cost when they pick sites, so the projects that would be crippled by it mostly never file; attrition after filing is driven by other things. Caveats: this is a county-level (ecological) proxy, not per-project gen-tie length, and only 552 of 1,254 settled LBNL rows carry a county value.

Performance tuning (the query-plan story)

01_schema.sql deliberately creates no indexes; 09_tuning.sql captures EXPLAIN (ANALYZE, BUFFERS) before and after creating GiST geometry indexes and a GIN trigram index on normalized substation names. Full plans are in outputs/plan_*.txt.

Query Before After Speedup Plan change
KNN nearest line, 2,221 plants 12,834 ms 88 ms 146x per-row seq scan + sort → GiST index order-by scan
Trigram POI candidate join 35,211 ms 1,747 ms 20x nested seq scans → GiST ST_DWithin index probes

One wrinkle worth knowing before anyone asks: the GIN trigram index is idle in that second plan. The shipped matcher filters on similarity(a,b) >= 0.45, which is a plain expression the planner cannot service with a trigram index; only the % operator (bounded by pg_trgm.similarity_threshold) is index-accelerated. The join speedup above comes entirely from the GiST ST_DWithin probes. 09_tuning.sql closes the loop with a %-operator demo that does hit the GIN index (Bitmap Index Scan, ~1 ms; outputs/plan_trgm_gin_demo.txt).

Data sources

Dataset Vintage Role
ERCOT Generator Interconnection Status (GIS) Report, EMIL PG7-200-ER June 2026 the queue: INR, county, POI name, fuel, MW, milestones
LBNL Queued Up data file (Rand et al., 2026) through 2025 historical outcomes for attrition and the cost test
HIFLD Electric Power Transmission Lines (via ArcGIS FeatureServer) last edit Sep 2023 line geometry + voltage
OpenStreetMap substations via Overpass API July 2026 named substation points for POI matching
EIA-860 (2024 final) 2024 operating fleet: coordinates, capacity, fuel, year online
US Census TIGERweb State_County current county polygons

Raw files stay out of git; each carries its retrieval metadata (source URL, timestamp, feature count) embedded in the GeoJSON metadata key written at download time.

Data limitations (read before quoting anything)

  • POI match rate is 47.6%, and the 52.4% centroid-fallback projects are excluded from all location-sensitive statements. Line-tap POIs are matched to one endpoint substation (location error up to the segment length).
  • Substations come from OpenStreetMap, not HIFLD. The public HIFLD Electric Substations layer was retired from open access; OSM (9,087 substations in the Texas bounding box, 4,413 named) is the substitute, under ODbL, © OpenStreetMap contributors. Unnamed OSM substations depress the match rate; the 47.6% is partly a data-coverage number, not purely a method number.
  • HIFLD lines are transmission-class only and last edited September 2023. Absolute distances are not comparable to studies that include distribution circuits (this is why operating-solar medians here, 908 m, sit far above the ~55 m median in solar-siting-tx, which used a denser network). Lines energized after 2023 are missing, which can only overstate distances for the newest plants; the vintage null finding (newer solar not farther) survives that bias, since the bias runs against it.
  • Fleet and grid layers are statewide Texas, while the queue is ERCOT. ERCOT serves about 90% of Texas load; counties in El Paso, the upper Panhandle, and parts of east Texas belong to other interconnections. The county-density cost test treats all in-state transmission as available infrastructure, which is the physically relevant quantity for a gen-tie but not an ERCOT-only measure.
  • LBNL cohorts after 2020 are right-censored (63-93% of outcomes still pending) and excluded from attrition claims. Censoring is nonzero even inside the included window (46% of the 2020 cohort, 29% of 2019 is still pending), so cohort completion rates are lower bounds for the most recent included years. County is missing for 56% of settled ERCOT rows, limiting the cost test to 552 projects.
  • A queued project is an application, not a plant. Nothing here forecasts ERCOT capacity adequacy, and queue totals must never be read as future supply.
  • queue_date uses the report's "Screening Study Started" milestone (ERCOT does not publish raw request dates in this file); LBNL cohort years use LBNL's own q_year.

Repository layout and reproduction

py/00_download.py          exact retrieval endpoints/queries for every raw file
sql/01_schema.sql          tables + extensions (postgis, pg_trgm), no indexes yet
py/01_load.py              download-file parsing and COPY into staging
sql/03_clean_queue.sql     fuel normalization, amendment dedupe, capacity checks
sql/04_geolocate_poi.sql   trigram POI geolocation + validation sample
sql/05_grid_distance.sql   KNN distances (operating fleet) + circularity diagnostic
sql/06_county_pressure.sql county pressure materialized view
sql/07_cohort_attrition.sql LBNL cohort survival
sql/08_queue_vs_built.sql  solar vintage analysis + county-density cost test
sql/09_tuning.sql          EXPLAIN before/after, index creation
sql/10_exports.sql         summary CSVs -> outputs/
py/02_figures.py           the three figures -> images/

Reproduce: create a PostgreSQL 16 database named ercot_queue with PostGIS 3.4, drop the six raw files into data_raw/ (sources above), then psql -f sql/01_schema.sql, python3 py/01_load.py, and run scripts 03 through 10 in order.

References

Driscoll, W. (2026, January 7). ERCOT outperformed on interconnection in 2024 likely due to "connect and manage." pv magazine USA. https://pv-magazine-usa.com/2026/01/07/ercot-outperformed-on-interconnection-in-2024-likely-due-to-connect-and-manage/

Howland, E. (2023, November 27). Can ERCOT show the way to faster and cheaper grid interconnection? Utility Dive. https://www.utilitydive.com/news/connect-and-manage-grid-interconnection-ferc-ercot-transmission-planning/698949/

Lawrence Berkeley National Laboratory. (n.d.). Generator interconnection costs to the transmission system. Energy Markets & Policy. https://emp.lbl.gov/interconnection_costs

Rand, J., Cheyette, A., Talley, C., Zhang, S., Gorman, W., Wiser, R. H., Seel, J., Jeong, S., & Kahrl, F. (2026). Queued up: 2026 edition. Characteristics of power plants seeking transmission interconnection as of the end of 2025. Lawrence Berkeley National Laboratory. https://emp.lbl.gov/queues

Map data © OpenStreetMap contributors, available under the Open Database License (ODbL).

About

ERCOT's 434 GW interconnection queue analyzed in PostgreSQL/PostGIS: trigram POI geolocation, county queue pressure, cohort attrition, and the cost factor

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors