Categories
Database Development

Postgres query performance – hash aggregate costly operation

I’m running Postgres 9.6.6 and I have a relatively simple query, however, I’m finding that it is slow with the hash aggregation function which is the most costly operation: select program_schedule_source_count.full_name, program_schedule_source_count.country, sum(program_schedule_source_count.displays) as displays, program_schedule_source_count.source_id, program_schedule_source_count.source_region from program_schedule_source_count where program_schedule_source_count.original_title = ‘How I Met Your Mother’ and program_schedule_source_count.show_type in (‘SM’, ‘SE’) and program_schedule_source_count.start_date between […]

Categories
CMS Development Wordpress

Frontend submission upload image via external url

I have AJAX form to get movie data by movie id and post this data into new post. This is my function, It’s works very well, But i can’t upload image via external URL. // Image URL $poster = ‘//domain.com/image.jpg’; // Submit Function function movie_grabber() { if(isset($_POST[‘movie_nonce_field’]) && wp_verify_nonce($_POST[‘movie_nonce_field’], ‘movie_nonce’)) { if(strlen(trim($_POST[‘title’])) < 1 || […]